<template>
    <div class="rightFloatBox">
        <div class="title">
            <span>{{title}}</span>
            <el-icon @click="close"><Close /></el-icon>
        </div>
        <div class="flMain">
            <slot/>
        </div>
    </div>
</template>

<script setup>
import {ref} from "vue"
const props = defineProps({
    title:''
})
const emit = defineEmits(['close'])
const close = ()=>{
    emit('close')
}
</script>

<style lang="scss">
.rightFloatBox{
    box-sizing: border-box;
    position: absolute;
    z-index: 2002;
    right: 0;
    top: 0;
    width: 300px;
    //max-height: calc(100vh - 84px);
    background-color: #fff;
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px 0px;
    .title{
        display: flex;
        width: 100%;
        align-items: center;
        height: 30px;
        font-size: 14px;
        span{
            flex: 1;
        }
        i{
            font-size: 18px;
            color: #999;
            &:hover{
                cursor: pointer;
                color: #48b27a;
            }
        }
    }
    .flMain{
        max-height: calc(100vh - 134px); 
        overflow: hidden;
        overflow-y: auto;
    }
}
</style>